from PySide6.QtWidgets import (
    QApplication,
    QMainWindow,
    QPushButton,
    QLabel,
    QWidget,
    QLineEdit,
)
from PySide6.QtCore import Qt


class Window(QMainWindow):
    def __init__(self):
        super().__init__()
        btn = QPushButton("测试按钮", self)
        btn.setGeometry(100, 100, 200, 50)
        label = QLabel("Hello World")
        label.setAlignment(Qt.AlignmentFlag.AlignCenter)
        label.setStyleSheet("font-size: 24px; color: red;")
        self.setCentralWidget(label)
        lineEdit = QLineEdit(self)
        lineEdit.setGeometry(100, 200, 200, 50)
        lineEdit.setPlaceholderText("请输入内容")


if __name__ == "__main__":
    app = QApplication([])
    window = Window()
    window.show()
    app.exec()
